import request from '../axios'

export const getList = (current: number, size: number, params: any) => {
  return request({
    url: '/api/blade-system/tenant/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    },
  })
}
export const remove = (ids: string[]) => {
  return request({
    url: '/api/blade-system/tenant/remove',
    method: 'post',
    params: {
      ids,
    },
  })
}

export const add = (row: any) => {
  return request({
    url: '/api/blade-system/tenant/submit',
    method: 'post',
    data: row,
  })
}

export const update = (row: any) => {
  return request({
    url: '/api/blade-system/tenant/submit',
    method: 'post',
    data: row,
  })
}

export const info = (domain: string) => {
  return request({
    url: '/api/blade-system/tenant/info',
    method: 'get',
    params: {
      domain,
    },
  })
}

export const getTenantType = () => {
  return request({
    url: '/api/blade-system/dict/dictionary?code=schoolType',
    method: 'get',
  })
}
